{include file="stddecor.form.open.tpl" }
<table cellspacing="0" class="objHeader">
<tr>
    <td class="objHeader-td-icon"><img src="{$SPIcfg.dir.pubsite_styles|escape}manage/image/topic_icons/{$data.topic|escape}_{$data.tmode|escape}.gif" /></td>
    <td class="objHeader-td-header">
        <div>
            <h1>{$data.title|escape}</h1>
            <h2>{$data.subtitle|escape}</h2>
        </div>

        <div class="objHeader-action_buttons">
            <div class="right">{include file="obj.button.tpl" name="Назад" link=$data.link_back icon="back" }</div>
            <br class="clear" />
        </div>
    </td>
</tr>
</table>
{include file="stddecor.form.close.tpl" }

{* ************************************************************************* *}

{include file="stddecor.form.open.tpl" }

<form id="cntForm" name="cntForm" method="post" action="{$data.link_form_submit|escape}">
{foreach from=$data.formvars key=varname item=varvalue }
<input type="hidden" name="{$varname|escape}" value="{$varvalue|escape}" />
{/foreach}

<center>
<table cellspacing="8" class="cntForm">

{if $data.list_types|@count > 1 }
    <tr>
        <td class="cntForm-td-title"><div>Тип записи:</div></td>
        <td class="cntForm-td-object">
            <select class="select" name="field[type]">
            <option value="0">&lt;укажите значение&gt;</option>
            {foreach from=$data.list_types key=type_key item=type_name }
                <option value="{$type_key|escape}"{if $type_key == $content.item_fields.type } selected="selected"{/if}>{$type_name|escape}</option>
            {/foreach}
            </select>
        </td>
        <td class="cntForm-td-error buggy_obj buggy_obj__type"></td>
    </tr>
{elseif $data.const_type }
    <input type="hidden" name="field[type]" value="{$data.const_type|escape}" />
{/if}

{if in_array( $data.tmode, array( 'song' ) ) }
    <tr>
        <td class="cntForm-td-title"><div>Участник TOP'а</div></td>
        <td class="cntForm-td-object">
            <select class="select" name="field[workstatus]">
                <option value="1"{if '1' == $content.item_fields.workstatus } selected="selected"{/if}>Учавствует в TOP'е</option>
				/--<option value="0"{if '2' == $content.item_fields.workstatus } selected="selected"{/if}>В новинках</option>#######################################--/
                <option value="0"{if '0' == $content.item_fields.workstatus } selected="selected"{/if}>Не учавствует в TOP'е</option>
				
            </select>
        </td>
        <td class="cntForm-td-error buggy_obj buggy_obj__workstatus"></td>
    </tr>

    <tr><td>&nbsp;</td></tr>

    <tr>
        <td class="cntForm-td-title"><div>Название песни:</div></td>
        <td class="cntForm-td-object">
            <input type="text" class="text" name="field[name]" value="{$content.item_fields.name|escape}" maxlength="255" />
        </td>
        <td class="cntForm-td-error buggy_obj buggy_obj__name"></td>
    </tr>
    <tr>
        <td class="cntForm-td-title"><div>Исполнитель:</div></td>
        <td class="cntForm-td-object">
            <input type="text" class="text" name="field[anons]" value="{$content.item_fields.anons|escape}" maxlength="255" />
        </td>
        <td class="cntForm-td-error buggy_obj buggy_obj__anons"></td>
    </tr>
{elseif in_array( $data.tmode, array( 'video' ) ) }
    <tr>
        <td class="cntForm-td-title"><div>Активность:</div></td>
        <td class="cntForm-td-object">
            <select class="select" name="field[workstatus]">
                <option value="1"{if '1' == $content.item_fields.workstatus } selected="selected"{/if}>Включено</option>
                <option value="0"{if '0' == $content.item_fields.workstatus } selected="selected"{/if}>Выключено</option>
            </select>
        </td>
        <td class="cntForm-td-error buggy_obj buggy_obj__workstatus"></td>
    </tr>

    <tr><td>&nbsp;</td></tr>

    <tr>
        <td class="cntForm-td-title"><div>Название:</div></td>
        <td class="cntForm-td-object">
            <input type="text" class="text" name="field[name]" value="{$content.item_fields.name|escape}" maxlength="255" />
        </td>
        <td class="cntForm-td-error buggy_obj buggy_obj__name"></td>
    </tr>
    <tr>
        <td class="cntForm-td-title"><div>YouTube ссылка:</div></td>
        <td class="cntForm-td-object">
            <input type="text" class="text" name="field[anons]" value="{$content.item_fields.anons|escape}" maxlength="255" />
            <div class="light">Если ссылка указана - будет проигрываться ролик с YouTube, иначе будет проигрываться клип загруженный ниже</div>
        </td>
        <td class="cntForm-td-error buggy_obj buggy_obj__anons"></td>
    </tr>
{/if}

{if $content.item_fields.t_created }
<tr>
    <td class="cntForm-td-title"><div class="light">Дата создания:</div></td>
    <td class="cntForm-td-object"><div class="light">{$content.item_fields.t_created|date}</div></td>
    <td></td>
</tr>
{/if}

{if $content.item_fields.t_updated }
<tr>
    <td class="cntForm-td-title"><div class="light">Дата модификации:</div></td>
    <td class="cntForm-td-object"><div class="light">{$content.item_fields.t_updated|date}</div></td>
    <td></td>
</tr>
{/if}

</table>

<div class="splitter padded"></div>

<table cellspacing="8" cellpadding="0">
<tr>
    <td>{include file="obj.button.tpl" name="Сохранить" onclick="cntForm_submit()" icon="save" }</td>
    <td width="25">&nbsp;</td>
    <td>{include file="obj.button.tpl" name="Отменить" link=$data.link_back icon="cancel" }</td>
</tr>
</table>

</center>

</form>
{include file="stddecor.form.close.tpl" }

{* ************************************************************************* *}

{if $content.media_audio }
    {if $content.media_photo }
        {include file="media/manager.tpl" item_title="Изображение" media=$content.media_photo }
    {/if}

    {include file="media/manager.tpl" item_title="MP3-аудио файл" media=$content.media_audio }
{/if}

{* ************************************************************************* *}

{if $content.media_video }
    {if $content.media_photo }
        {include file="media/manager.tpl" item_title="Изображение [400x240]" media=$content.media_photo }
    {/if}

    {include file="media/manager.tpl" item_title="FLV-видео ролик [400x240]" media=$content.media_video }
{/if}

{* ************************************************************************* *}
